<div id="forum">

<include target="_header.html" />

<form action="./" method="post" onsubmit="return procFilter(this, window.insert)" id="fo_write" class="forumWrite">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
<input type="hidden" name="document_srl" value="{$document_srl}" />

<table border="0" cellspacing="0" class="forumCategoryList">
	<thead>
		<tr class="rootCateg">
			<td class="small">
				<div class="first">
					&nbsp;
				</div>
			</td>
			<td class="large">
				<div class="center middle">
					{$lang->write_new_thread}
				</div>
			</td>
			<td class="small">
				<div class="last">
					&nbsp;
				</div>
			</td>
		</tr>
	</thead>
	<tbody>
		<tr class="separator longForm">
			<td class="gF">
				<label for="title_post">{$lang->title} :</label>
			</td>
			<td colspan="2">
				<input type="text" name="title" class="inputText" value="{htmlspecialchars($oDocument->getTitleText())}" id="title_post"/>
			</td>
		</tr>
		<tr class="separator longForm">
			<td class="gF">
				<label for="category_srl">{$lang->category} :</label>
			</td>
			<td colspan="2">
				<select name="category_srl" class="select" id="category_srl">
					<option value="">{$lang->category}</option>
					<!--@foreach($category_list as $val)-->
					<option <!--@if(!$val->grant)-->disabled="disabled"<!--@endif--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@endif-->>
						{str_repeat(" -->",$val->depth)} {$val->title} ({$val->document_count})
					</option>
					<!--@endforeach-->
				</select>
			</td>
		</tr>
		<tr class="separator">
			<td class="gF" valign="top">
				<label>{ucfirst($lang->message)} :</label>
			</td>
			<td colspan="2">
				{$oDocument->getEditor()}
			</td>
		</tr>
		<!--@if(count($extra_keys))-->
		<!--@foreach($extra_keys as $key => $val)-->
	    <tr class="separator">
	    	<td class="gF">
				<label for="notify_message">{htmlspecialchars($val->name)} <!--@if($val->is_required=='Y')--><em>*</em><!--@end--></label>
			</td>
			<td colspan="2">
				{$val->getFormHTML()}
			</td>      
	    </tr>
	    <!--@endforeach-->
		<!--@endif-->
		<!--@if($is_logged)-->
		<!--@if($grant->manager || $grant->moderator)-->
		<tr class="separator">
			<td class="gF">
				<label for="is_notice">{$lang->notice}</label>
			</td>
			<td colspan="2">
				<input type="checkbox" name="is_notice" value="Y" <!--@if($oDocument->isNotice())-->checked="checked"<!--@end--> id="is_notice" />
			</td>
		</tr>
		
		<tr class="separator">
			<td class="gF">
				<label for="allow_comment">{$lang->allow_comment}</label>
			</td>
			<td colspan="2">
				<input type="checkbox" name="allow_comment" value="Y" <!--@if($oDocument->allowComment())-->checked="checked"<!--@end--> id="allow_comment" />
			</td>
		</tr>
		<!--@end-->
		<tr class="separator">
			<td class="gF">
				<label for="notify_message">{$lang->notify}</label>
			</td>
			<td colspan="2">
				<input type="checkbox" name="notify_message" value="Y" <!--@if($isNotified)-->checked="checked"<!--@end--> id="notify_message" class="inputCheck" />
			</td>
		</tr>
		<!--@endif-->
		<tr class="separator">
			<td>
			</td>
			<td colspan="2">
				<!--@if($is_logged)-->
				<!-- 
				<a href="#" class="forumButton blue" onclick="doDocumentSave(this); return false;" ><span class="outer"><span class="inner">{$lang->cmd_temp_save}</span></span></a>
				<a href="#" class="forumButton blue" onclick="doDocumentLoad(this); return false;" ><span class="outer"><span class="inner">{$lang->cmd_load}</span></span></a>
				-->
				<!--@end-->
				<a href="#" class="forumButton blue" onclick="jQuery('#fo_write').submit();return false;" ><span class="outer"><span class="inner">{$lang->cmd_registration}</span></span></a>
			</td>
		</tr>
	</tbody>
</table>

    
    </form>
<include target="_footer.html" />

</div>
